/**
 * @Author: Boring
 * @Description:
 * @File:  ingress
 * @Date: 2024-03-02 14:50
 */

package ingress

import (
	"github.com/gin-gonic/gin"
	"oam-manage-backend/controllers/ingress"
)

func create(ingressGroup *gin.RouterGroup) {
	ingressGroup.POST("/create", ingress.Create)
}

func update(ingressGroup *gin.RouterGroup) {
	ingressGroup.PUT("/update", ingress.Update)
}

func delete(ingressGroup *gin.RouterGroup) {
	ingressGroup.DELETE("/delete", ingress.Delete)
}

func deleteList(ingressGroup *gin.RouterGroup) {
	ingressGroup.POST("/deleteList", ingress.DeleteList)
}

func get(ingressGroup *gin.RouterGroup) {
	ingressGroup.GET("/get", ingress.Get)
}

func list(ingressGroup *gin.RouterGroup) {
	ingressGroup.GET("/list", ingress.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	ingressGroup := g.Group("/ingress")
	create(ingressGroup)
	update(ingressGroup)
	delete(ingressGroup)
	deleteList(ingressGroup)
	get(ingressGroup)
	list(ingressGroup)
}
